(f) Implement a new version of the algorithm, incorporating this additional
permutation.
